/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package mtbldomain.impl;

import java.util.Collection;

import mtbldomain.MetricDescriptionType;
import mtbldomain.MetricType;
import mtbldomain.MtblDomainPackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Metric Description Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getMetric <em>Metric</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getMetricDescription <em>Metric Description</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getContainerName <em>Container Name</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getEndOffset <em>End Offset</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getFqname <em>Fqname</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getKind <em>Kind</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getLanguage <em>Language</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getLine <em>Line</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getLocation <em>Location</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getName <em>Name</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getOffset <em>Offset</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getProjectName <em>Project Name</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getResource <em>Resource</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getResourceName <em>Resource Name</em>}</li>
 *   <li>{@link mtbldomain.impl.MetricDescriptionTypeImpl#getTimestamp <em>Timestamp</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class MetricDescriptionTypeImpl extends EObjectImpl implements MetricDescriptionType {
	/**
	 * The cached value of the '{@link #getMetric() <em>Metric</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMetric()
	 * @generated
	 * @ordered
	 */
	protected EList<MetricType> metric;

	/**
	 * The cached value of the '{@link #getMetricDescription() <em>Metric Description</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMetricDescription()
	 * @generated
	 * @ordered
	 */
	protected EList<MetricDescriptionType> metricDescription;

	/**
	 * The default value of the '{@link #getContainerName() <em>Container Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getContainerName()
	 * @generated
	 * @ordered
	 */
	protected static final String CONTAINER_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getContainerName() <em>Container Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getContainerName()
	 * @generated
	 * @ordered
	 */
	protected String containerName = CONTAINER_NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getEndOffset() <em>End Offset</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEndOffset()
	 * @generated
	 * @ordered
	 */
	protected static final int END_OFFSET_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getEndOffset() <em>End Offset</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEndOffset()
	 * @generated
	 * @ordered
	 */
	protected int endOffset = END_OFFSET_EDEFAULT;

	/**
	 * This is true if the End Offset attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean endOffsetESet;

	/**
	 * The default value of the '{@link #getFqname() <em>Fqname</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFqname()
	 * @generated
	 * @ordered
	 */
	protected static final String FQNAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getFqname() <em>Fqname</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFqname()
	 * @generated
	 * @ordered
	 */
	protected String fqname = FQNAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getKind()
	 * @generated
	 * @ordered
	 */
	protected static final int KIND_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getKind()
	 * @generated
	 * @ordered
	 */
	protected int kind = KIND_EDEFAULT;

	/**
	 * This is true if the Kind attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean kindESet;

	/**
	 * The default value of the '{@link #getLanguage() <em>Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLanguage()
	 * @generated
	 * @ordered
	 */
	protected static final String LANGUAGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLanguage() <em>Language</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLanguage()
	 * @generated
	 * @ordered
	 */
	protected String language = LANGUAGE_EDEFAULT;

	/**
	 * The default value of the '{@link #getLine() <em>Line</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLine()
	 * @generated
	 * @ordered
	 */
	protected static final int LINE_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLine() <em>Line</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLine()
	 * @generated
	 * @ordered
	 */
	protected int line = LINE_EDEFAULT;

	/**
	 * This is true if the Line attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean lineESet;

	/**
	 * The default value of the '{@link #getLocation() <em>Location</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocation()
	 * @generated
	 * @ordered
	 */
	protected static final String LOCATION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocation()
	 * @generated
	 * @ordered
	 */
	protected String location = LOCATION_EDEFAULT;

	/**
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected static final String NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected String name = NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getOffset() <em>Offset</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOffset()
	 * @generated
	 * @ordered
	 */
	protected static final int OFFSET_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getOffset() <em>Offset</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOffset()
	 * @generated
	 * @ordered
	 */
	protected int offset = OFFSET_EDEFAULT;

	/**
	 * This is true if the Offset attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean offsetESet;

	/**
	 * The default value of the '{@link #getProjectName() <em>Project Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProjectName()
	 * @generated
	 * @ordered
	 */
	protected static final String PROJECT_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getProjectName() <em>Project Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProjectName()
	 * @generated
	 * @ordered
	 */
	protected String projectName = PROJECT_NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getResource() <em>Resource</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResource()
	 * @generated
	 * @ordered
	 */
	protected static final String RESOURCE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getResource() <em>Resource</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResource()
	 * @generated
	 * @ordered
	 */
	protected String resource = RESOURCE_EDEFAULT;

	/**
	 * The default value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResourceName()
	 * @generated
	 * @ordered
	 */
	protected static final String RESOURCE_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResourceName()
	 * @generated
	 * @ordered
	 */
	protected String resourceName = RESOURCE_NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getTimestamp() <em>Timestamp</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTimestamp()
	 * @generated
	 * @ordered
	 */
	protected static final int TIMESTAMP_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getTimestamp() <em>Timestamp</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTimestamp()
	 * @generated
	 * @ordered
	 */
	protected int timestamp = TIMESTAMP_EDEFAULT;

	/**
	 * This is true if the Timestamp attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean timestampESet;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected MetricDescriptionTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return MtblDomainPackage.Literals.METRIC_DESCRIPTION_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<MetricType> getMetric() {
		if (metric == null) {
			metric = new EObjectContainmentEList<MetricType>(MetricType.class, this, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC);
		}
		return metric;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<MetricDescriptionType> getMetricDescription() {
		if (metricDescription == null) {
			metricDescription = new EObjectContainmentEList<MetricDescriptionType>(MetricDescriptionType.class, this, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION);
		}
		return metricDescription;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getContainerName() {
		return containerName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setContainerName(String newContainerName) {
		String oldContainerName = containerName;
		containerName = newContainerName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__CONTAINER_NAME, oldContainerName, containerName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getEndOffset() {
		return endOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEndOffset(int newEndOffset) {
		int oldEndOffset = endOffset;
		endOffset = newEndOffset;
		boolean oldEndOffsetESet = endOffsetESet;
		endOffsetESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET, oldEndOffset, endOffset, !oldEndOffsetESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetEndOffset() {
		int oldEndOffset = endOffset;
		boolean oldEndOffsetESet = endOffsetESet;
		endOffset = END_OFFSET_EDEFAULT;
		endOffsetESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET, oldEndOffset, END_OFFSET_EDEFAULT, oldEndOffsetESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetEndOffset() {
		return endOffsetESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getFqname() {
		return fqname;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFqname(String newFqname) {
		String oldFqname = fqname;
		fqname = newFqname;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__FQNAME, oldFqname, fqname));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getKind() {
		return kind;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setKind(int newKind) {
		int oldKind = kind;
		kind = newKind;
		boolean oldKindESet = kindESet;
		kindESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND, oldKind, kind, !oldKindESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetKind() {
		int oldKind = kind;
		boolean oldKindESet = kindESet;
		kind = KIND_EDEFAULT;
		kindESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND, oldKind, KIND_EDEFAULT, oldKindESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetKind() {
		return kindESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLanguage(String newLanguage) {
		String oldLanguage = language;
		language = newLanguage;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LANGUAGE, oldLanguage, language));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLine() {
		return line;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLine(int newLine) {
		int oldLine = line;
		line = newLine;
		boolean oldLineESet = lineESet;
		lineESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE, oldLine, line, !oldLineESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetLine() {
		int oldLine = line;
		boolean oldLineESet = lineESet;
		line = LINE_EDEFAULT;
		lineESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE, oldLine, LINE_EDEFAULT, oldLineESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetLine() {
		return lineESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLocation() {
		return location;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLocation(String newLocation) {
		String oldLocation = location;
		location = newLocation;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LOCATION, oldLocation, location));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName(String newName) {
		String oldName = name;
		name = newName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__NAME, oldName, name));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getOffset() {
		return offset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOffset(int newOffset) {
		int oldOffset = offset;
		offset = newOffset;
		boolean oldOffsetESet = offsetESet;
		offsetESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET, oldOffset, offset, !oldOffsetESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetOffset() {
		int oldOffset = offset;
		boolean oldOffsetESet = offsetESet;
		offset = OFFSET_EDEFAULT;
		offsetESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET, oldOffset, OFFSET_EDEFAULT, oldOffsetESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetOffset() {
		return offsetESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getProjectName() {
		return projectName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProjectName(String newProjectName) {
		String oldProjectName = projectName;
		projectName = newProjectName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__PROJECT_NAME, oldProjectName, projectName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getResource() {
		return resource;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setResource(String newResource) {
		String oldResource = resource;
		resource = newResource;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE, oldResource, resource));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getResourceName() {
		return resourceName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setResourceName(String newResourceName) {
		String oldResourceName = resourceName;
		resourceName = newResourceName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE_NAME, oldResourceName, resourceName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getTimestamp() {
		return timestamp;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTimestamp(int newTimestamp) {
		int oldTimestamp = timestamp;
		timestamp = newTimestamp;
		boolean oldTimestampESet = timestampESet;
		timestampESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP, oldTimestamp, timestamp, !oldTimestampESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetTimestamp() {
		int oldTimestamp = timestamp;
		boolean oldTimestampESet = timestampESet;
		timestamp = TIMESTAMP_EDEFAULT;
		timestampESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP, oldTimestamp, TIMESTAMP_EDEFAULT, oldTimestampESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetTimestamp() {
		return timestampESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC:
				return ((InternalEList<?>)getMetric()).basicRemove(otherEnd, msgs);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION:
				return ((InternalEList<?>)getMetricDescription()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC:
				return getMetric();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION:
				return getMetricDescription();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__CONTAINER_NAME:
				return getContainerName();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET:
				return new Integer(getEndOffset());
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__FQNAME:
				return getFqname();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND:
				return new Integer(getKind());
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LANGUAGE:
				return getLanguage();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE:
				return new Integer(getLine());
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LOCATION:
				return getLocation();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__NAME:
				return getName();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET:
				return new Integer(getOffset());
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__PROJECT_NAME:
				return getProjectName();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE:
				return getResource();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE_NAME:
				return getResourceName();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP:
				return new Integer(getTimestamp());
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC:
				getMetric().clear();
				getMetric().addAll((Collection<? extends MetricType>)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION:
				getMetricDescription().clear();
				getMetricDescription().addAll((Collection<? extends MetricDescriptionType>)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__CONTAINER_NAME:
				setContainerName((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET:
				setEndOffset(((Integer)newValue).intValue());
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__FQNAME:
				setFqname((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND:
				setKind(((Integer)newValue).intValue());
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LANGUAGE:
				setLanguage((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE:
				setLine(((Integer)newValue).intValue());
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LOCATION:
				setLocation((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__NAME:
				setName((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET:
				setOffset(((Integer)newValue).intValue());
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__PROJECT_NAME:
				setProjectName((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE:
				setResource((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE_NAME:
				setResourceName((String)newValue);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP:
				setTimestamp(((Integer)newValue).intValue());
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC:
				getMetric().clear();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION:
				getMetricDescription().clear();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__CONTAINER_NAME:
				setContainerName(CONTAINER_NAME_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET:
				unsetEndOffset();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__FQNAME:
				setFqname(FQNAME_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND:
				unsetKind();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LANGUAGE:
				setLanguage(LANGUAGE_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE:
				unsetLine();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LOCATION:
				setLocation(LOCATION_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__NAME:
				setName(NAME_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET:
				unsetOffset();
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__PROJECT_NAME:
				setProjectName(PROJECT_NAME_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE:
				setResource(RESOURCE_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE_NAME:
				setResourceName(RESOURCE_NAME_EDEFAULT);
				return;
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP:
				unsetTimestamp();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC:
				return metric != null && !metric.isEmpty();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__METRIC_DESCRIPTION:
				return metricDescription != null && !metricDescription.isEmpty();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__CONTAINER_NAME:
				return CONTAINER_NAME_EDEFAULT == null ? containerName != null : !CONTAINER_NAME_EDEFAULT.equals(containerName);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__END_OFFSET:
				return isSetEndOffset();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__FQNAME:
				return FQNAME_EDEFAULT == null ? fqname != null : !FQNAME_EDEFAULT.equals(fqname);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__KIND:
				return isSetKind();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LANGUAGE:
				return LANGUAGE_EDEFAULT == null ? language != null : !LANGUAGE_EDEFAULT.equals(language);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LINE:
				return isSetLine();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__LOCATION:
				return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__NAME:
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__OFFSET:
				return isSetOffset();
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__PROJECT_NAME:
				return PROJECT_NAME_EDEFAULT == null ? projectName != null : !PROJECT_NAME_EDEFAULT.equals(projectName);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE:
				return RESOURCE_EDEFAULT == null ? resource != null : !RESOURCE_EDEFAULT.equals(resource);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__RESOURCE_NAME:
				return RESOURCE_NAME_EDEFAULT == null ? resourceName != null : !RESOURCE_NAME_EDEFAULT.equals(resourceName);
			case MtblDomainPackage.METRIC_DESCRIPTION_TYPE__TIMESTAMP:
				return isSetTimestamp();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (containerName: ");
		result.append(containerName);
		result.append(", endOffset: ");
		if (endOffsetESet) result.append(endOffset); else result.append("<unset>");
		result.append(", fqname: ");
		result.append(fqname);
		result.append(", kind: ");
		if (kindESet) result.append(kind); else result.append("<unset>");
		result.append(", language: ");
		result.append(language);
		result.append(", line: ");
		if (lineESet) result.append(line); else result.append("<unset>");
		result.append(", location: ");
		result.append(location);
		result.append(", name: ");
		result.append(name);
		result.append(", offset: ");
		if (offsetESet) result.append(offset); else result.append("<unset>");
		result.append(", projectName: ");
		result.append(projectName);
		result.append(", resource: ");
		result.append(resource);
		result.append(", resourceName: ");
		result.append(resourceName);
		result.append(", timestamp: ");
		if (timestampESet) result.append(timestamp); else result.append("<unset>");
		result.append(')');
		return result.toString();
	}

} //MetricDescriptionTypeImpl
